package net.xi.dmhome.controller;

import net.xi.dmhome.entity.Symptom;
import net.xi.dmhome.entity.Type;
import net.xi.dmhome.handler.Result;
import net.xi.dmhome.service.SymptomService;
import net.xi.dmhome.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: jxhu
 * @Description:展示糖尿病数据
 * @Date Created in 2021-02-18 14:19
 * @Modified By:
 */


@RestController
public class DiaController {

    @Autowired
    TypeService typeService;
    @Autowired
    SymptomService symptomService;

    @GetMapping("/listdiaType")
    public Result listDiatype(){
        List<Type> list = typeService.list();
        return Result.success(list);
    }

    @GetMapping("/listSymptom")
    public Result listSymptom(){
        List<Symptom> list = symptomService.list();
        return Result.success(list);
    }
}
